# -*- coding: UTF-8 -*-

from accessFile import  access
import os
import shutil

class ls():
    def __init__(self):
        pass

    def listDir(self,path):
        access_ = access(path)
        if access_.isDir():
            return os.listdir(path)
        elif access_.isFile():
            return self.listFile()


    def listFile(self,path):
        access_ = access(path)
        fileAcess = [] # r=,w=,x=
        fileAcess.append("r="+str(access_.isROk()))
        fileAcess.append("w="+str(access_.isWOk()))
        fileAcess.append("x="+str(access_.isEOk()))
        return fileAcess


Ls = ls()
lsCmd = Ls

if __name__ == "__main__":
    print(Ls.listFile("ls.py"))

